CC = gcc
target=test
SRC = ${wildcard  *.c} 
OBJ = $(patsubst %.c, %.o, ${SRC})
CFLAGS += -O3 -Wall
CLIBS += -L /usr/local/lib -lssl -lcrypto
INC += -L ./cJSON
${target}: ${OBJ}
	${CC} ${OBJ} -o $@ $(INC) $(CLIBS)
$(OBJ):%.o:%.c
	$(CC) ${CFLAGS} -c $< -o $@ $(INC) $(CLIBS)
clean:
	rm -f ${OBJ}
	rm -f *.o
	rm -f *~
